<!--  -->
<template>
  <div class="check_system_body">
    <div class="check_system_centen">
      <p style="line-height: 150%; text-align: center">
        <span style="color: rgb(0, 176, 240); font-size: 20px"
          ><strong
            ><span style="color: rgb(0, 176, 240); font-family: 新宋体"
              >申请团体会员步骤说明</span
            ></strong
          ></span
        >
      </p>
      <p style="line-height: 150%"><br /></p>
      <p style="line-height: 150%">
        <strong
          ><span style="background-color: rgb(255, 255, 255)"
            ><span
              style="
                background-image: initial;
                background-position: initial;
                background-size: initial;
                background-repeat: initial;
                background-attachment: initial;
                background-origin: initial;
                background-clip: initial;
              "
              >1.</span
            ><span
              style="
                font-family: 新宋体;
                background-image: initial;
                background-position: initial;
                background-size: initial;
                background-repeat: initial;
                background-attachment: initial;
                background-origin: initial;
                background-clip: initial;
              "
              >填写基本信息：</span
            ></span
          ></strong
        ><span style="background-color: rgb(255, 255, 255)"
          ><span
            style="
              font-family: 新宋体;
              background-image: initial;
              background-position: initial;
              background-size: initial;
              background-repeat: initial;
              background-attachment: initial;
              background-origin: initial;
              background-clip: initial;
            "
            >团体会员可上传单位</span
          ><span
            style="
              background-image: initial;
              background-position: initial;
              background-size: initial;
              background-repeat: initial;
              background-attachment: initial;
              background-origin: initial;
              background-clip: initial;
            "
            >LOGO</span
          ><span
            style="
              font-family: 新宋体;
              background-image: initial;
              background-position: initial;
              background-size: initial;
              background-repeat: initial;
              background-attachment: initial;
              background-origin: initial;
              background-clip: initial;
            "
            >或商标作为团体会员头像（头像需审核且不能更改）；单位名称须填写注册公司全称；单位简称如有可以填写；填写邮寄地址及联系人信息，用于后续寄送实体会员证书等物品。</span
          ></span
        >
      </p>
      <p style="line-height: 150%">
        <strong
          >2.<span style="font-family: 新宋体">上传入会申请书：</span></strong
        ><span style="font-family: 新宋体">请附上已签字并盖章的入会申请书</span
        ><span style="font-family: 新宋体"
          >清晰PDF扫描件；请注意，请确保上传的文件为《上海市篮球协会第十二届单位会员入会申请书》；请确保上传的文件附件填写完整（含附件一、附件二）。</span
        >
      </p>
      <p style="line-height: 150%">
        <strong
          >3.<span style="font-family: 新宋体">上传资质证明：</span></strong
        ><span style="font-family: 新宋体"
          >请提供营业执照副本复印件或法人登记证书副本复印件，并加盖单位公章以证明您的会员资格。</span
        >
      </p>
      <p style="line-height: 150%">
        <strong
          >4.<span style="font-family: 新宋体">上传银行付款凭证：</span></strong
        ><span style="font-family: 新宋体"
          >团体会员会费缴纳使用银行转账形式，请附上贵单位缴纳会费的银行转账电子回单，以证明您已支付会费。若您是免收会费单位（政府机构、事业单位、政府派驻本会人员、协议免收会费单位等），请勾选免收会费单位选项。</span
        >
      </p>
      <p style="line-height: 150%">
        <span style="font-family: 新宋体; color: rgb(0, 176, 240)"
          >以上是团体会员线上注册登记需提交审核的内容的详细说明，希望对您有所帮助。如有其他疑问，请联系上海市篮球协会秘书处：18116496980，相关工作人员将会为您解答。</span
        >
      </p>
      <p><br /></p>
    </div>
    <div class="sign_botton" @click="downloadFile">下载登记表</div>
    <div class="xiafang">
      <van-checkbox v-model="checked">我已知晓</van-checkbox>

      <div class="sign_botton sd" @click="toMemberinformation">立即申请</div>
    </div>
    <van-dialog
      zIndex="100"
      v-model="dialogShowsd"
      title="提示"
      width="6rem"
      :showConfirmButton="false"
    >
      <p class="psd">
        苹果手机请使用默认浏览器打开此文档进行下载，或复制文档链接自行下载。
      </p>
      <div class="member_constitution_bottom">
        <div class="member_constitution_btn_b" @click="agreeBtnas()">
          <!-- [
            isBottom
              ? 'member_constitution_btn_b'
              : 'member_constitution_btn_w',
          ] -->
          复制链接并下载
        </div>
      </div>
    </van-dialog>
  </div>
</template>

<script>
import { Indicator, Toast } from "mint-ui";
import { Checkbox, CheckboxGroup, Dialog } from "vant";
export default {
  components: {
    [Checkbox.name]: Checkbox,
    [CheckboxGroup.name]: CheckboxGroup,
    [Dialog.name]: Dialog,
  },
  name: "",
  data() {
    return {
      download_url: "",
      checked: false,
      dialogShowsd: false,
    };
  },
  mounted() {
    this.tuantilist();
  },
  methods: {
    tuantilist() {
      let that = this;
      let url = "/mobile/getAssociationVipInfo";
      let data = {};
      Indicator.open();
      this.axios
        .post(url, data)
        .then((response) => {
          Indicator.close();
          if (response.code == 0) {
            console.log(response);
            this.download_url = response.download_url;
          } else {
            Toast({
              message: response.msg,
              duration: 3000,
            });
          }
        })
        .catch(function (error) {
          Indicator.close();
          console.log(error);
        });
    },
    agreeBtnas() {
      const url = this.download_url;
      const input = document.createElement("input");
      input.setAttribute("value", url);
      document.body.appendChild(input);
      input.select();
      if (document.execCommand("copy")) {
        console.log("复制成功");
      }
      document.body.removeChild(input);
      this.dialogShowsd = false;
      window.location.href = this.download_url;
    },
    downloadFile() {
      this.dialogShowsd = true;
    },
    toMemberinformation() {
      if (this.checked == false) {
        Toast({
          message: "请选中我已知晓",
          duration: 3000,
        });
      } else {
        this.$router.push({
          name: "Memberinformation",
        });
      }
    },
  },
};
</script>

<style scoped>
.check_system_body {
  width: 100vw;
  height: 100vh;
  /* padding: 0.8rem 0 0; */
  box-sizing: border-box;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: space-between; */
}
.check_system_centen {
  width: 90%;
  padding: 2.5%;
  margin-top: 0.2rem;
  opacity: 1;
  border-radius: 10px;

  background: rgba(255, 255, 255, 1);
  box-shadow: 4px 4px 20px 2px rgba(214, 214, 214, 0.25);
}
.spams {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  opacity: 1;
  background: rgba(222, 237, 255, 1);
}
.sign_botton {
  background-color: #016ffd;
  width: 80%;
  height: 0.95rem;
  opacity: 1;
  border-radius: 10px;
  background: rgba(222, 237, 255, 1);
  color: rgba(0, 113, 255, 1);
  text-align: center;
  line-height: 0.95rem;
  margin: 0.6rem auto 0;
}
.xiafang {
  width: 100%;
  position: fixed;
  bottom: 0.3rem;
}
.sd {
  background-color: rgba(0, 113, 255, 1);
  border-radius: 10px;
  color: #ffffff;
  text-align: center;
  line-height: 0.95rem;
  margin: 0.2rem auto 0;
}
.van-checkbox {
  margin-top: 0.5rem;
  margin-left: 0.8rem;
}
.member_constitution_btn_b {
  width: 80%;
  margin: 0.2rem auto;
  height: 0.8rem;
  line-height: 0.8rem;
  box-sizing: border-box;
  background-color: #016ffd;
  color: #fff;
  text-align: center;
  border-radius: 0.4rem;
}
.psd {
  padding: 0.3rem;
  font-size: 0.28rem;
  font-weight: 400;
  letter-spacing: 0px;
  line-height: 0.8rem;
  color: rgba(0, 0, 0, 1);
  text-align: left;
  vertical-align: top;
}
</style>
